package com.cloudkinto.service.user;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.UserDo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.service.user.vo.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author 张永远
 * @since 2020-05-27
 */
public interface UserService extends IService<UserDo> {

    //用户登录
    UserLoginSuccessRes login(UserLoginReq req);

    //根据用户名密码获取token
    SingleResult getToken(String username,String password);

    //退出登录
    void logout(String token);

    //用户注册
    UserRegisterReq register(UserRegisterReq req);

    SingleResult bindKeyInit();

    SingleResult keySecret(Long plantFormId,Long shopId);

    SingleResult shopListFromPlantForm(Long plantFormId,Long companyId);

    SingleResult addInit(Long companyId);

    UserBuildReq add(UserBuildReq req, Long userId,Long companyId);

    SingleResult updateInit(Long id);

    UserUpdateReq update(UserUpdateReq updateVo, Long userId);

    UpdatePasswordReq updatePassword(UpdatePasswordReq req ,Long userId);

    SingleResult bindKey(UserBindReq req,Long userId);

    SingleResult getAuthorizeMsg(Long shopId, Map<String, String> map, Long userId);

    int delete(Long id, Long userId);

    SingleResult verificationCode();

    SingleResult getPhoneByAccount(String userAccount);

    SingleResult verificationCodeByPhone(SendMsgReq req);

    SingleResult verificationCodeCheck(CheckCodeReq req);

    SingleResult findBackPassword(FindBackPasswordReq req);

    SingleResult pageInit();

    List<UserListPageRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    UserLoginSuccessRes main(String token);

    SingleResult shopifyGetAuthorization(Long shopId,Long companyId, String code, String session, String state, String host, String hmac, String shop, String timp);
}
